<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用循环将三个div变成红色</title>
</head>
<link rel="stylesheet" href="./css/index.css">
<script src="./js/index.js"></script>
<body>
<input type="button" value="点击将div变成红色" id="btn">
<div id="div">
    <div></div> 
    <div></div>
    <div></div>
</div>
</body>
</html>